package com.nbsaas.boot.config.rest.convert;

import com.nbsaas.boot.config.data.entity.UserConfig;
import com.nbsaas.boot.config.api.domain.request.UserConfigRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 用户配置请求对象转换成实体对象
*/

public class UserConfigEntityConvert  implements Converter<UserConfig, UserConfigRequest> {

    @Override
    public UserConfig convert(UserConfigRequest source) {
        UserConfig result = new UserConfig();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

